package cn.itcast.demo1;

import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;

public class Test {
    public static void main(String[] args) throws IOException {
        Reader reader = new FileReader("D:\\java\\demo1\\FileProject\\src\\cn\\itcast\\lib\\1.txt");
//        int ch1 = reader.read();
//        System.out.println(ch1);
//        int ch2 = reader.read();
//        System.out.println(ch2);
//        int ch3 = reader.read();
//        System.out.println(ch3);
        int ch = reader.read();
        while ((ch=reader.read())!=-1){
            System.out.println(ch);
        }
        reader.close();
    }
}
